SpatialStream® Code Examples

Points of Interest Map Display

Using SpatialStream® Points of Interest Layer, SLD (Stylized Layer Descriptor), and GetMap components, you can access nationwide Points of Interest data and attributes for display in your web mapping application. This example will demonstrate how to add POI data for the entire US. The SLD component allows you to apply an icon and add labels based on attributes in the Point of Interest layer and tailor the following display parameters of your POI's: Icon, Icon Background color, size, and opacity. Once the SLD is defined, the GetMap component generates the overlay for your map.

The primary benefit of defining a layer’s style in an SLD is that the layer style definitions are maintained outside the code, so making changes to the layer style are fast and easy as application code doesn’t need to be changed to do so. Because layer styling is separate from the application, you have the option of letting data visualization experts style your layers, who may not necessarily be your application programmers.

SLD | GetMap


layer = new Dmp.Layer.WmsLayer("POI", "SS");
layer.addChild("point", "SS.Admin.TT.POI/POI", "PUBLIC_FOLDER/Styles/POI/RREBLACK.sld.xml", {
zIndex: 100, zoomRange: {
min: 10, max: 19
}
});
map.addEntity(layer);


Run Sample   Back To Index